[I have added Gregs comments to the archive, as I do not have enough time to debug and modify the archive - Shane]

Shane,

I just wanted to let you know that your site has provided a wealth of 
information while I've been learning to program the PIC's with the Hi-Tech 
compiler. Seems like there is always something new that is interesting.

I did find an error in your decimal output routines, though, when converting the 
binary to BCD. The routine to check if each nibble is greater than 5 should be 
before the shift routine. Here's the corrected routine:

for (c=0;c<32;c++) {
  for (d=4;d<7;d++) {
    if ((cdec.byte[d]&0x0F)>=0x05) cdec.byte[d]+=0x3;
    if ((cdec.byte[d]&0xF0)>=0x50) cdec.byte[d]+=0x30;
  }

  //shift hi:lo <<1

  d=cdec.byte[3];
  cdec.lng.low<<=1;
  cdec.lng.high<<=1;
  if ( (d& 0x80)==0x80) cdec.byte[4]|=1;
} //65W

This eliminates the need to adjust the characters later on in the BCD to ASCII routine:

if (d>=8) d-=3;

Thanks again for the PIC site!

Kind regards,

Greg Maki [makig@earthlink.net]